using UnityEngine;
using Voodoo.Sauce.Internal.GDPR;
using Voodoo.Sauce.Internal.GDPR.UI;

public class AdTrackingConditionalUI : MonoBehaviour
{
	[SerializeField]
	private GameObject[] _objectsDisabledIfAdTracking;

	[SerializeField]
	private GameObject[] _objectsDisabledIfNotAdTracking;

	[SerializeField]
	private SimpleCheckbox[] _checkboxesLockedIfAdTracking;

	private void Start()
	{
		if (VoodooGDPR.HasLimitAdTrackingEnabled())
		{
			GameObject[] objectsDisabledIfAdTracking = _objectsDisabledIfAdTracking;
			foreach (GameObject gameObject in objectsDisabledIfAdTracking)
			{
				gameObject.SetActive(value: false);
			}
			SimpleCheckbox[] checkboxesLockedIfAdTracking = _checkboxesLockedIfAdTracking;
			foreach (SimpleCheckbox simpleCheckbox in checkboxesLockedIfAdTracking)
			{
				simpleCheckbox.Lock(value: false);
			}
		}
		else
		{
			GameObject[] objectsDisabledIfNotAdTracking = _objectsDisabledIfNotAdTracking;
			foreach (GameObject gameObject2 in objectsDisabledIfNotAdTracking)
			{
				gameObject2.SetActive(value: false);
			}
		}
	}
}
